<?php
namespace Home\Controller;
use Think\Controller;
class ContactController extends Controller {
	public function _initialize() {
       $img = D('Img')->order("sort desc")->select();
       if(empty($img)){
       	$this->error('没有轮播图');
       }
       $this->assign('list',$img);

         //联系我们
    $contact = D('Contact')->order('id desc')->find();
    $contact['content'] = html_entity_decode($contact['content']);
      if(empty($contact)){
      	$this->error('没有添加关于我们');
      }	
    $this->assign('contact',$contact);
	}

	
    public function index(){
  $this->display();
   }
}